﻿using System;
using System.Collections.Generic;
using System.Linq;
namespace SuperStar.Models
{
    public class ProductTypeModels
    {
        public SuperStarEntities DB { get; set; }
        public String DEBUGTYPE { get; set; }

        public ProductTypeModels()
        {
               DB = new SuperStarEntities();
        }
        public List<ProductType> GetList()
        {
            return DB.ProductTypes.ToList();
        } 
        public ProductType GetDetailProductCategory(int catId)
        {
            var p = from c in DB.ProductTypes
                    where c.Id == catId
                    select c;
            return p.Single();
        }
    }
}
